package spring.framework.beans.factory;

import spring.framework.beans.BeansException;

import java.util.Map;

/**
 * @author fun.pengzh
 * @class spring.framework.beans.factory.ListableBeanFactory
 * @desc
 * @since 2021-09-30
 */
public interface ListableBeanFactory extends BeanFactory{

    /**
     * 根据类型返回Bean实例
     *
     * @param type
     * @param <T>
     * @return
     * @throws BeansException
     */
    <T> Map<String, T> getBeansOfTypes(Class<T> type) throws BeansException;

    /**
     * 返回已注册的BeanDefinition的名称数组
     *
     * @return
     */
    String[] getBeanDefinitionNames();
}
